cc5279e5635b05c13bcf38a036a8ab3b4f5616a2,portal-impl/test/unit/com/liferay/portal/cluster/ClusterLinkImplTest.java,ClusterLinkImplTest,testGetTransportAddressesByPriority2,#,218
Before Change
TransportationConfigurationAdvice.setChannelCount(2);
ClusterLinkImpl clusterLinkImpl1 = getClusterLinkImpl();
ClusterLinkImpl clusterLinkImpl2 = getClusterLinkImpl();
List<JChannel> jChannels1 = getJChannels(clusterLinkImpl1);
Assert.assertEquals(2, jChannels1.size());
List<JChannel> jChannels2 = getJChannels(clusterLinkImpl2);
Assert.assertEquals(2, jChannels2.size());
List<Address> addresses1 = clusterLinkImpl1.getTransportAddresses(
Priority.LEVEL1);
Assert.assertEquals(2, addresses1.size());
List<Address> addresses2 = clusterLinkImpl1.getTransportAddresses(
Priority.LEVEL6);
Assert.assertEquals(2, addresses2.size());
Assert.assertEquals(
getJGroupsAddress(jChannels1, 0), getRealAddress(addresses1, 0));
Assert.assertEquals(
getJGroupsAddress(jChannels1, 1), getRealAddress(addresses2, 0));
Assert.assertEquals(
getJGroupsAddress(jChannels2, 0), getRealAddress(addresses1, 1));
Assert.assertEquals(
getJGroupsAddress(jChannels2, 1), getRealAddress(addresses2, 1));
clusterLinkImpl1.destroy();
clusterLinkImpl2.destroy();
}
@AdviseWith(
After Change
ClusterLinkImpl clusterLinkImpl2 = null;
try {
clusterLinkImpl1 = getClusterLinkImpl();
clusterLinkImpl2 = getClusterLinkImpl();
List<JChannel> jChannels1 = getJChannels(clusterLinkImpl1);